import request from '@/config/axios'

export const getsiyun = ({ params }) => {
  return request.get({
    url: '/SyteacherSelController/seCurriculumTree',
    params
  })
}
// 获取课程表格数据
export const getCourseTable = (data: any): Promise<IResponse> => {
  return request.post({ url: '/siyun/SyteacherSelController/SeCurriculumTab', data })
}
// 获取课程树
export const getCourseTree = (data: any): Promise<IResponse> => {
  return request.get({ url: '/siyun/SyteacherSelController/seCurriculumTree', data })
}

//获取课程用户详细信息
export const getCourseUserInfo =(data :any): Promise<IResponse> => {
  return request.post({url:'/siyun/SyOperationController/seluserInfos',data})
}
//改变课程状态
export const changeCourseStatus =(data:any):Promise<IResponse>=>{
  return request.post({url:'/siyun/SyteacherSelController/updateStatus',data})
}

//添加课程
export const addCourse =(data:any):Promise<IResponse>=>{
  return request.post({url:'/siyun/SyOperationController/addCourse',data},)
}
//删除课程
export const delCourse =(data:any):Promise<IResponse>=>{
  return request.post({url:'/siyun/SyteacherSelController/delectCourseTable',data},)
}
